<template>
   <view class="my-serach-contanier" @click="searchHandler" :style="{'background-color':baColor}">
     <view class="my-search-box" :style="{'border-radius':radius+'px'}" >
      <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
     </view>
   </view>
</template>

<script>
  export default {
    name:"mySearch",
    props:{
      baColor:{
        type:String,
        default:'#C00000'
      },
      radius:{
        type:Number,
        default:18
      }
    },
    data() {
      return {
        
      };
    },
    methods:{
      searchHandler(){
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.my-serach-contanier {
  background-color: #C00000;
  height: 50px;
  display: flex;
  align-items: center;
  .my-search-box {
    width: 100%;
    height: 36px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    .placeholder {
      font-size: 15px;
      margin-left: 5px;
    }
  }
}
</style>